Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add internal logic for listening to event responders #15168

Merged
merged 7 commits into from
Mar 21, 2019

Conversation

trueadm
Copy link
Contributor

@trueadm trueadm commented Mar 20, 2019

Note: this is for an experimental event API that we're testing out internally at Facebook.

This PR adds logic to listen to events defined in event responders, following on from previous PRs:

This PR is quite difficult to test in isolation without creating unit tests that depend on internals (which I know we're moving away from as a team). In the next PR, I'll add further logic that connects the event firing to appropriate events that make for good public API tests. There isn't much to this PR to review other than a single function where most of the work happens, so hopefully it should be transparent as to what happens.l

@facebook facebook deleted a comment from sizebot Mar 21, 2019
Copy link
Contributor

@threepointone threepointone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just nits, but looks good to me. and I understood it this time!

packages/react-dom/src/client/ReactDOMComponent.js Outdated Show resolved Hide resolved
packages/react-dom/src/client/ReactDOMComponent.js Outdated Show resolved Hide resolved
@sizebot
Copy link

sizebot commented Mar 21, 2019

Details of bundled changes.

Comparing: c05b4b8...f9fa91b

react-dom

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-dom.development.js +0.5% +0.5% 796.63 KB 800.26 KB 180.8 KB 181.69 KB UMD_DEV
react-dom.profiling.min.js 0.0% -0.0% 108.08 KB 108.08 KB 34.62 KB 34.62 KB UMD_PROFILING
react-dom.development.js +0.5% +0.5% 791.02 KB 794.65 KB 179.19 KB 180.07 KB NODE_DEV
react-dom.profiling.min.js 0.0% -0.0% 108.17 KB 108.17 KB 34.07 KB 34.07 KB NODE_PROFILING
ReactDOM-dev.js +0.5% +0.6% 814.97 KB 818.92 KB 180.57 KB 181.58 KB FB_WWW_DEV
ReactDOM-prod.js 🔺+0.7% 🔺+0.6% 322.21 KB 324.47 KB 59.24 KB 59.6 KB FB_WWW_PROD
ReactDOM-profiling.js +2.7% +2.2% 327.18 KB 336.02 KB 60.48 KB 61.79 KB FB_WWW_PROFILING
react-dom-unstable-fire.development.js +0.5% +0.5% 796.98 KB 800.6 KB 180.93 KB 181.83 KB UMD_DEV
react-dom-unstable-fire.production.min.js 0.0% -0.0% 105.11 KB 105.11 KB 33.95 KB 33.95 KB UMD_PROD
react-dom-unstable-fire.profiling.min.js 0.0% -0.0% 108.09 KB 108.09 KB 34.63 KB 34.63 KB UMD_PROFILING
react-dom-unstable-fire.development.js +0.5% +0.5% 791.37 KB 794.99 KB 179.33 KB 180.21 KB NODE_DEV
react-dom-unstable-fire.production.min.js 0.0% -0.0% 105.08 KB 105.08 KB 33.47 KB 33.47 KB NODE_PROD
react-dom-unstable-fire.profiling.min.js 0.0% -0.0% 108.18 KB 108.18 KB 34.08 KB 34.08 KB NODE_PROFILING
ReactFire-dev.js +0.5% +0.5% 814.18 KB 818.13 KB 180.45 KB 181.44 KB FB_WWW_DEV
ReactFire-prod.js 🔺+0.7% 🔺+0.7% 310.79 KB 313.06 KB 56.87 KB 57.28 KB FB_WWW_PROD
ReactFire-profiling.js +2.8% +2.0% 315.82 KB 324.56 KB 58.14 KB 59.32 KB FB_WWW_PROFILING
react-dom-test-utils.development.js 0.0% -0.0% 47.21 KB 47.21 KB 12.91 KB 12.91 KB NODE_DEV
react-dom-unstable-native-dependencies.development.js 0.0% -0.0% 60.53 KB 60.53 KB 15.8 KB 15.8 KB UMD_DEV
react-dom-unstable-native-dependencies.production.min.js 0.0% -0.0% 10.69 KB 10.69 KB 3.67 KB 3.66 KB UMD_PROD
react-dom-unstable-native-dependencies.development.js 0.0% -0.0% 60.2 KB 60.2 KB 15.67 KB 15.67 KB NODE_DEV
react-dom-unstable-native-dependencies.production.min.js 0.0% -0.1% 10.42 KB 10.42 KB 3.57 KB 3.56 KB NODE_PROD
react-dom-server.browser.development.js 0.0% -0.0% 133.58 KB 133.58 KB 35.32 KB 35.32 KB UMD_DEV
react-dom-server.browser.development.js 0.0% -0.0% 129.71 KB 129.71 KB 34.39 KB 34.39 KB NODE_DEV
ReactDOMServer-dev.js 0.0% -0.0% 131.94 KB 131.94 KB 34.08 KB 34.08 KB FB_WWW_DEV
react-dom-server.node.development.js 0.0% -0.0% 131.65 KB 131.65 KB 34.93 KB 34.93 KB NODE_DEV
react-dom-unstable-fizz.browser.production.min.js 0.0% -0.3% 1.21 KB 1.21 KB 706 B 704 B UMD_PROD
react-dom-unstable-fizz.browser.production.min.js 0.0% -0.2% 1.05 KB 1.05 KB 637 B 636 B NODE_PROD
react-dom-unstable-fizz.node.development.js 0.0% -0.1% 3.74 KB 3.74 KB 1.43 KB 1.43 KB NODE_DEV
react-dom-unstable-fizz.node.production.min.js 0.0% -0.1% 1.1 KB 1.1 KB 667 B 666 B NODE_PROD

Generated by 🚫 dangerJS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants